
package guipk;

/**
 *
 * @author LJC
 */
public class AdGoFrame extends javax.swing.JFrame {

    /**
     * Creates new form AdGoFrame
     */
    
    //子窗口
    private AdFrame adFrame;
    //成员
    private String AdName = "";
    
    //************************************************
    /* Constructor */
    
    public AdGoFrame() {
        initComponents();
        this.setLocationRelativeTo(null);
        this.setVisible(true);
    }

    public AdGoFrame(String AdName) {
        initComponents();
        this.setLocationRelativeTo(null);
        this.setVisible(true);
        this.AdName = AdName;
    }
    
    //************************************************

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        PlayerManageMenu = new javax.swing.JMenu();
        OpenPlayerManageMenuItem = new javax.swing.JMenuItem();
        FlagManageMenu = new javax.swing.JMenu();
        OpenFlagManageMenuItem = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Administrator Go");
        setBounds(new java.awt.Rectangle(0, 0, 400, 300));
        setPreferredSize(new java.awt.Dimension(400, 330));

        jPanel1.setBackground(new java.awt.Color(153, 204, 255));
        jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel1.setFont(new java.awt.Font("华文行楷", 1, 36)); // NOI18N
        jLabel1.setText("管理员导航");
        jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 60, -1, -1));

        PlayerManageMenu.setText("玩家管理");

        OpenPlayerManageMenuItem.setText("打开玩家管理器");
        OpenPlayerManageMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                OpenPlayerManageMenuItemActionPerformed(evt);
            }
        });
        PlayerManageMenu.add(OpenPlayerManageMenuItem);

        jMenuBar1.add(PlayerManageMenu);

        FlagManageMenu.setText("国旗管理");

        OpenFlagManageMenuItem.setText("打开国旗管理器");
        OpenFlagManageMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                OpenFlagManageMenuItemActionPerformed(evt);
            }
        });
        FlagManageMenu.add(OpenFlagManageMenuItem);

        jMenuBar1.add(FlagManageMenu);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void OpenPlayerManageMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OpenPlayerManageMenuItemActionPerformed
        // TODO add your handling code here:
        adFrame = new AdFrame();
        this.dispose();
        
    }//GEN-LAST:event_OpenPlayerManageMenuItemActionPerformed

    private void OpenFlagManageMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OpenFlagManageMenuItemActionPerformed
        // TODO add your handling code here:
        new FlagFrame();
    }//GEN-LAST:event_OpenFlagManageMenuItemActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(AdGoFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(AdGoFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(AdGoFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(AdGoFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new AdGoFrame().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu FlagManageMenu;
    private javax.swing.JMenuItem OpenFlagManageMenuItem;
    private javax.swing.JMenuItem OpenPlayerManageMenuItem;
    private javax.swing.JMenu PlayerManageMenu;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
}
